package com.haizhi.bean;

// Generated 2016-8-15 17:44:37 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity: 
 */
@Entity
@Table(name = "tb_reply", catalog = "db_lemon3d")
public class TbReply implements java.io.Serializable {

	/** 
	 * �ظ�id.
	 */

	private Integer replyId;

	/** 
	 * �ظ���id.
	 */

	private TbUser tbUser;

	/** 
	 * ����id.
	 */

	private TbPost tbPost;

	/** 
	 * �ظ�����.
	 */

	private String replyContent;

	/** 
	 * �ظ�ʱ��.
	 */

	private Date replyTime;

	/** 
	 * ¥����.
	 */

	private int replyFloos;

	/** 
	 * �ظ�״̬��1Ϊ������0Ϊ����.
	 */

	private int replyType;

	public TbReply() {
	}

	public TbReply(TbUser tbUser, TbPost tbPost, String replyContent,
			Date replyTime, int replyFloos, int replyType) {
		setTbUser(tbUser);
		setTbPost(tbPost);
		setReplyContent(replyContent);
		setReplyTime(replyTime);
		setReplyFloos(replyFloos);
		setReplyType(replyType);
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "reply_id", unique = true, nullable = false)
	public Integer getReplyId() {
		return this.replyId;
	}

	public void setReplyId(Integer replyId) {
		this.replyId = replyId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", nullable = false)
	public TbUser getTbUser() {
		return this.tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "post_id", nullable = false)
	public TbPost getTbPost() {
		return this.tbPost;
	}

	public void setTbPost(TbPost tbPost) {
		this.tbPost = tbPost;
	}

	@Column(name = "reply_content", nullable = false, length = 3000)
	public String getReplyContent() {
		return this.replyContent;
	}

	public void setReplyContent(String replyContent) {
		this.replyContent = replyContent;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "reply_time", nullable = false, length = 19)
	public Date getReplyTime() {
		return this.replyTime;
	}

	public void setReplyTime(Date replyTime) {
		this.replyTime = replyTime;
	}

	@Column(name = "reply_floos", nullable = false)
	public int getReplyFloos() {
		return this.replyFloos;
	}

	public void setReplyFloos(int replyFloos) {
		this.replyFloos = replyFloos;
	}

	@Column(name = "reply_type", nullable = false)
	public int getReplyType() {
		return this.replyType;
	}

	public void setReplyType(int replyType) {
		this.replyType = replyType;
	}

}
